import java.util.HashMap;
import java.util.*;

public class TreeMap1 implements WordSet
{
	private TreeMap<String,String> mapa;
	
	public TreeMap1(){
		mapa= new TreeMap();
	}
	
	public void add(Word word){
		mapa.put(word.getWord(),word.getType());
	}
	
	public Word get(Word word){
        if (!(mapa.containsKey(word.getWord())))
            return null;
        return new Word(word.getWord(),mapa.get(word.getWord()));
       
	}
	
	
}